import request from '@/utils/request'

export function getAttachmentPage(query) {
  return request({
    url: '/cms/attachment/list',
    method: 'get',
    params: query
  })
}


export function addAttachment(obj) {
  return request({
    url: '/cms/attachment',
    method: 'post',
    data: obj
  })
}

export function getAttachment(id) {
  return request({
    url: '/cms/attachment/' + id,
    method: 'get'
  })
}

export function delAttachment(id) {
  return request({
    url: '/cms/attachment/' + id,
    method: 'delete'
  })
}

export function putAttachment(obj) {
  return request({
    url: '/cms/attachment',
    method: 'put',
    data: obj
  })
}
